package com.ryskoo.controller.customer;

import com.ryskoo.customer.customerlevel.domain.CustomerLevelPO;
import com.ryskoo.customer.customerlevel.service.ICustomerLevelService;
import com.ryskoo.framework.core.bean.ReturnMessageDTO;
import com.ryskoo.framework.core.controller.BasicHandler;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 会员等级管理 web controller
 *
 * @author hh
 */
@Controller
@RequestMapping(value = "/vendor/customer/customerlevel")
public class CustomerLevelController extends BasicHandler<CustomerLevelPO> {

	private ICustomerLevelService customerLevelService;

	public CustomerLevelController() {
		super("system/customer/customerlevel", "CustomerLevel");
	}

	@Autowired
	public void setService(ICustomerLevelService customerLevelService) {
		this.customerLevelService = customerLevelService;
		super.setService(customerLevelService);
	}

	@Override
	public ReturnMessageDTO add(@RequestBody CustomerLevelPO dto) {
		dto.setOperUuid("admin");
		return super.add(dto);
	}

}
